<extend name="Public/base"/>
<block name="body">
  <form method="post" class="form-horizontal J_ajaxForm"  action="{:U("")}">
    <div class="tab-content">
      <div class="space-4"></div>
      <div class="form-group">
        <label class="col-sm-2 control-label "> 角色名称 </label>
        <div class="col-sm-10">
          <input type="text"  value="{$data.name}"  name="name" class="col-xs-10 col-sm-5" />
        </div>
      </div>
      <div class="space-4"></div>
      <div class="form-group">
        <label class="col-sm-2 control-label "> 角色描述 </label>
        <div class="col-sm-10">
          <textarea name="remark" rows="5" class="autosize-transition col-xs-10 col-sm-7 ">{$data.remark}</textarea>
        </div>
      </div>
      <div class="space-4"></div>

      <div class="form-group">
        <label class="col-sm-2 control-label "> 是否启用 </label>
        <div class="col-sm-10">
          <label class="radio inline" for="active_true">
            <input type="radio" name="status" value="1" checked id="active_true"/>
            开启 </label>
          <label class="radio inline" for="active_false">
            <input type="radio" name="status" value="0" id="active_false">
            禁止 </label>
        </div>
      </div>
      
      
      <div class="space-4"></div>
    </div>
    <if condition="$edit">
      <input type="hidden"  name="id"   value="{$data.id}"  />
    </if>
    <div class="form-actions">
      <button class="btn btn-info ajax-post"   target-form="J_ajaxForm" type="submit">
      <if condition="$edit">更新
        <else/>
        添加</if>
      </button>
      <a class="btn btn-return" href="__URL__" >返 回</a> </div>
  </form>
</block>
